<template>
    <div>
        2222
    </div>
</template>

<script>
    export default {
        name: "Test",
        data() {
            return {
                arr: [
                    { id: 1, name: '张三', age: 20 },
                    { id: 2, name: '李四', age: 21 },
                    { id: 3, name: '王五', age: 22 },
                    { id: 4, name: '小明', age: 23 },
                ]
            }
        },
        mounted() {
            var filter = this.arr.filter(s => s['age'] == '21');
            console.log(filter)
        }
    }
</script>

<style scoped>

</style>